Assignments with calculations

Operators which can be used are, in order of precedence:

-

unary minus (negation).

^

power, where the right-hand side is the exponent

/ *

divide and multiply

+ -

add and subtract

The order of calculation is thereafter from left to right. Standard brackets ( ) can be used to control the order of calculation.

Examples:

@Assign Num = Num * 10

Num is a numeric attribute to be multiplied by 10.

@Assign Date = Date + Num + 7

Date is a date attribute. The value of the numeric attribute Num and the value 7 are to be added to Date. The result will be in a valid date format, with leap years being allowed for.

@Assign Total = Net + (Net * Tax)

With these numeric attributes, Total is calculated by adding the value of Net to the result of Net multiplied by Tax.

As an alternative to using the @Concat command, you can use data concatenation, with the + or & to separate variable names, plus ASCII codes can be included by prefixing the code with the # symbol. e.g. to add a CR/LF (a line break) in a string:

@Assign Name = 'John' + #13 + #10 + 'Smith'

Predefined functions